class CreateDormUsers < ActiveRecord::Migration[6.1]
  def change
    create_table :dorm_users do |t|
      t.string :name
      t.decimal :pay_balance
      t.integer :day_count
      t.decimal :act_water_pay
      t.decimal :act_electric_pay
      t.integer :dorm_id
      t.integer :hydropower_id

      t.timestamps
    end
    add_index :dorm_users, :dorm_id
    add_index :dorm_users, :hydropower_id
  end
end
